package com.cloudfun.campusshare.configuration.config;

import com.cloudfun.campusshare.configuration.property.KjtProperties;
import com.kjtpay.gateway.common.util.security.SecurityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by Huqin on 2020/8/11
 */
@Configuration
public class KjtSecurityServiceConfig {

    @Value("${gandao.private.key}")
    private String gdPrivateKey;

    @Autowired
    private KjtProperties kjtProperties;

    @Bean
    public SecurityService securityService() {
        return new SecurityService(gdPrivateKey, kjtProperties.getPublicKey());
    }

}
